Is there possibly a space in the path somewhere and you haven't enclosed it in quotes "C:/path/blah blah" ? Spaces don't play nice.Why am I not able to compile the 24bit-color example? I can compile other examples, just not this one. It always fails to compile with:
brew.png
Invalid Parameter - /Users
make[1]: *** [brew.bgr] Error 4
make: *** [build] Error 2
Why is that?
ifeq ($(strip $(NO_SMDH)),)
.PHONY: all
all : $(OUTPUT).3dsx $(OUTPUT).smdh
endif
$(OUTPUT).3dsx : $(OUTPUT).elf
$(OUTPUT).elf : $(OFILES)
ifeq ($(strip $(NO_SMDH)),)
$(OUTPUT).3dsx : $(OUTPUT).elf $(OUTPUT).smdh
else
$(OUTPUT).3dsx : $(OUTPUT).elf
endif
$(OUTPUT).elf : $(OFILES)
c:/devkitPro/!unPlugged/source/main.c:57: undefined reference to `sftd_init'
c:/devkitPro/!unPlugged/source/main.c:62: undefined reference to `sftd_load_font_mem'
c:/devkitPro/!unPlugged/source/main.c:120: undefined reference to `sftd_draw_textf'
c:/devkitPro/!unPlugged/source/main.c:166: undefined reference to `sftd_free_font'
You should get rid of that ! in your filepath. Don't know if that will fix it but it's a good idea anyway.I have a little program going on. I decided to add a font library (https://github.com/xerpi/sftdlib) and after installing al dependencies and library, I get this:
Code:c:/devkitPro/!unPlugged/source/main.c:57: undefined reference to `sftd_init' c:/devkitPro/!unPlugged/source/main.c:62: undefined reference to `sftd_load_font_mem' c:/devkitPro/!unPlugged/source/main.c:120: undefined reference to `sftd_draw_textf' c:/devkitPro/!unPlugged/source/main.c:166: undefined reference to `sftd_free_font'
I don't know what do next.
It is not recommended by devkitpro. There are situations where your code can be deleted during updates to devkitpro toolchains and libraries.The ! never gave me any problems (It's for alphabetical ordering).
Why I shouldn't put it inside devkitpro?
linking unplugged.elf
arm-none-eabi-gcc.exe: error: c:/myprograms/unPlugged/unplugged.elf: No such file or directory
make[1]: *** [/c/myprograms/unPlugged/unplugged.elf] Error 1
make: *** [build] Error 2
but homebrew are written in C or C ++?
Thanks
Probably C.What is the best C, C ++ or lua?
and what is more popular in homebrew?
Question.
Just how much does the GPU Scissor Test affect performance? I'd draw a rotating quad with a texture on the screen, getting 60fps easily, but when I decide to split the screen into scanlines via the Scissor Test, and draw the same polygon multiple times, the performance decreases quite harshly. Not to 30fps, but even lower to 10-15fps. Doesn't seem to matter the size of the texture used to render to the polygon either, as they all have about the same performance hit. The texture and destination color buffer are in VRAM.
static int lua_regsound(lua_State *L)
{
int argc = lua_gettop(L);
#ifndef SKIP_ERROR_HANDLING
if (argc != 2) return luaL_error(L, "wrong number of arguments");
#endif
u32 time = luaL_checkinteger(L, 1);
u32 samplerate = luaL_checkinteger(L, 2);
MICU_SampleRate smplrt;
if (samplerate <= 8200){
smplrt = MICU_SAMPLE_RATE_8180;
samplerate = 8180;
}else if (samplerate <= 12000){
smplrt = MICU_SAMPLE_RATE_10910;
samplerate = 10910;
}else if (samplerate <= 18000){
smplrt = MICU_SAMPLE_RATE_16360;
samplerate = 16360;
}else{
smplrt = MICU_SAMPLE_RATE_32730;
samplerate = 32730;
}
u32 micbuf_pos = 0;
u32* micbuf = (u32*)memalign(0x1000, 0x30000);
micInit((u8*)micbuf, 0x30000);
u32 micbuf_datasize = micGetSampleDataSize();
u32 audiobuf_size = time * samplerate;
u8* audiobuf = (u8*)linearAlloc(audiobuf_size);
u32 audiobuf_pos = 0;
MICU_StartSampling(MICU_ENCODING_PCM16_SIGNED, smplrt, 0, micbuf_datasize, true);
while (audiobuf_pos < audiobuf_size){
u32 micbuf_readpos = micbuf_pos;
micbuf_pos = micGetLastSampleOffset();
while (audiobuf_pos < audiobuf_size && micbuf_readpos != micbuf_pos){
audiobuf[audiobuf_pos] = micbuf[micbuf_readpos];
audiobuf_pos++;
micbuf_readpos = (micbuf_readpos + 1) % micbuf_datasize;
}
}
MICU_StopSampling();
micExit();
free(micbuf);
Music* songFile = (Music*)malloc(sizeof(Music));
songFile->audiobuf = audiobuf;
songFile->audiobuf2 = NULL;
songFile->big_endian = false;
songFile->mem_size = 0;
songFile->size = audiobuf_size;
songFile->samplerate = samplerate;
strcpy(songFile->author,"");
strcpy(songFile->title,"");
songFile->isPlaying = false;
songFile->bytepersample = 2;
songFile->magic = 0x4C534E44;
lua_pushinteger(L,(u32)songFile);
return 1;
}
Yeah, don't do that. Primitives which cover only few pixels are terrible for GPU performance, and repeatedly drawing tiny batches of data with state changes inbetween makes it even worse.
If all you really try to do is rendering every second line of a picture, use the stencil buffer instead to make the proper lines out.