Comments (12)
...add least on debug modus but im not sure this is a windows only (angle) problem.
a tester snippet like this hepls to show the line thickness is growing:
int startX = 0;
for (size_t i = 0; i < 12; i++)
{
startX = i*10;
auto lineDrawNode = DrawNode::create();
this->addChild(lineDrawNode, 10);
lineDrawNode->setLineWidth(i);
lineDrawNode->drawLine(Vec2(startX, 100 ), Vec2(startX + 10, 100), Color4F::ORANGE);
}
on windows is grows only between x=0...8 => line width==x-1 (and 0 ==1)
from axmol.
Switch to OpenGL can check this different behavior
from axmol.
Switch to OpenGL can check this different behavior
How?
from axmol.
Modify the macro CC_USE_GLES_ON_DESKTOP
to 0
at cocos/platform/CCPlatformConfig.h
from axmol.
#define CC_USE_GLES_ON_DESKTOP 1 => it has no thickness.
#define CC_USE_GLES_ON_DESKTOP 0 => shows the behavior as I has written above
from axmol.
Does the official v3 works well?
from axmol.
3.17.2 on windows shows the behavior as I has written above (only 0 is different=> 0 ==7pixel)
from axmol.
the line width at least 1px, see:
void CommandBufferGL::setLineWidth(float lineWidth)
{
if(lineWidth > 0.0f)
glLineWidth(lineWidth);
else
glLineWidth(1.0f);
}
from axmol.
Yes, that's correct it is on line 606 on CommandBufferGL.cpp.
That's the reason why a setLineWidth(0) has a thickness of 1 on engine-x
On 3.17.2 isn't this line anywhere.
from axmol.
I have found the reason of supported thickness 1-7 points:
GLint range[2];
glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, range);
returning 1,7
so it is clear that's my system only drawing a thickness between 1-7
Maybe it should be part of the documentation:
It is a good idea to add an info output on CCConfiguration.cpp too.
from axmol.
Here are more info for the documentation:
On my system (another system maybe having another min/max) :
CC_USE_GLES_ON_DESKTOP 1 has a supported min/max width of 1/1
CC_USE_GLES_ON_DESKTOP 0 has n supported min/max width of 1/7
from axmol.
seems google's angle renderer doesn't support non-1 line width.
from axmol.
Related Issues (20)
- JobSystem creates too many threads HOT 3
- ax::ui::WebView cannot display local image HOT 5
- Bug in FreeType lib for certain fonts HOT 1
- macOS Edit wrong alignment
- FastRNG seems to have problematic implementation HOT 30
- RenderTexture ContentSize Error HOT 3
- Cannot Capture properly take a screen capture of ax::ui::ImageView HOT 4
- Two rapidjson with different version cause unexpected crash problem on apple family platforms HOT 15
- MediaPlayer Video not correctly rendered for Android 11 and older devices
- [ImGui] Invalid texture data drawn on modal popups HOT 1
- ArchLinux setup dependencies always fail
- VolatileTextureMgr::addImage memory leak HOT 1
- HttpClient释放response指针异常
- FontFreeType performance issues on Android HOT 2
- UITest.json source HOT 3
- Node:getChildren()性能问题 HOT 6
- Unknow function "setTargetFlags" & "ax::RenderTargetFlag" in Live2D extensions
- Font Issue with Emojis & Emoticons HOT 2
- TextureCache::addImage should be return when textures found.
- checkReallySupportsASTC does not work on ios device HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axmol.