工作需要,画一条线,连接屏幕中点和触摸点,这条线要很粗,要能灵活的调整zOrder。 在这个要求下,我先用了 glLineWidth(10)和DrawPrimitives::drawLine(……)重写了draw方法实现了这个功能。 但是后来却发现杀千刀的glLineWidth,10-200没有任何变化,再后
工作需要,画一条线,连接屏幕中点和触摸点,这条线要很粗,要能灵活的调整zOrder。
在这个要求下,我先用了
glLineWidth(10)和DrawPrimitives::drawLine(……)重写了draw方法实现了这个功能。
但是后来却发现杀千刀的glLineWidth,10-200没有任何变化,再后来又发现,画出的线会被精灵华丽的挡
住,就算是把精灵的zOrder设为负数也无济于事。
无奈开始了百度之旅,论坛上发现了DrawNode这个东西,下手一试,果然有效。
DrawNode是将画出的图形作为Node存在于程序中的,可以和其他的Node一样随意的调整zOrder,而且也没有OpenGL 10点宽度的限制。但是DrawNode不会擦除上一帧留下的图形,所以我们需要一个全局指针,手动刷新。
下面是使用代码:
OK,经过这样的处理,总算达到了要求,线的宽度是可以随意调整的。
让我们看看超级粗的线!!

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Linux new version
SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

WebStorm Mac version
Useful JavaScript development tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft
