Comments (1)
Classic example of old code.
Today I'd write it like this:
std::vector<GLint> array_lengths(sources.size());
std::vector<GLcchar*> array_sources(sources.size());
for (size_t i = 0; i < sources.size(); i++)
{
array_lengths[i] = sources[i].length();
array_sources[i] = (GLchar*)sources[i].c_str();
}
glShaderSource(handle, sources.size(), array_sources.data(), array_lengths.data());
from clanlib.
Related Issues (20)
- License HOT 1
- Remake `IODevice` from `int` to `size_t` HOT 5
- Too complicated build system HOT 2
- Rejection of imp-> HOT 6
- Border style unfinished HOT 1
- clan::GameTime fault HOT 1
- Webpage error HOT 2
- Property DisplayWindowDescription.is_topmost() does not work on Mac OS HOT 2
- clan::PathHelp::get_basepath win32 drive names HOT 1
- ClanLib 2.2 for super methane brothers HOT 4
- Linux Audio HOT 2
- Clanlib fails to build on aarch64 HOT 2
- Old versions HOT 2
- /usr/share/doc/clanlib-4.1/Reference/html/Core.html is not formatted HOT 3
- Setup/Unix/pkgconfig/clanXML.pc.in: Name false HOT 3
- can't compile Examples/Display_Render/MapMode HOT 1
- sidebar points to old domain that is now taken over by spam HOT 2
- Assessment of the difficulty in porting CPU architecture for clanlib HOT 1
- Using clan::Path with OpenGL on Intel GPUs 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 clanlib.