Compare commits
No commits in common. "f15aad0c2ebe67acc9cea01e04078308141a0d44" and "7abf55e44b30f6a4dfcf64bdaf392ea1b9073417" have entirely different histories.
f15aad0c2e
...
7abf55e44b
@ -1,12 +0,0 @@
|
|||||||
\chapter{Dessiner}
|
|
||||||
\label{chap:dessin}
|
|
||||||
|
|
||||||
%
|
|
||||||
% new: Thu Sep 5 18:14:20 UTC 2024
|
|
||||||
%
|
|
||||||
|
|
||||||
% =======================================================================
|
|
||||||
|
|
||||||
\section{xpaint} \index{xpaint }
|
|
||||||
|
|
||||||
% =======================================================================
|
|
@ -1,5 +1,4 @@
|
|||||||
\chapter{Photographie}
|
\chapter{Photographie}
|
||||||
\label{chap:photos}
|
|
||||||
\index{Photo}
|
\index{Photo}
|
||||||
|
|
||||||
Le domaine de la photographie numérique est vaste.
|
Le domaine de la photographie numérique est vaste.
|
||||||
|
1
code/SDL2/.gitignore
vendored
1
code/SDL2/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
strangebug
|
|
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
strangebug: strangebug.c Makefile
|
|
||||||
gcc -Wall $< -lSDL2 -o $@
|
|
@ -1,11 +0,0 @@
|
|||||||
# Simple DirectMedia Layer
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
The *[Simple DirectMedia Layer](https://libsdl.org/)
|
|
||||||
is a cross-platform development library designed
|
|
||||||
to provide low level access to audio, keyboard, mouse, joystick, and
|
|
||||||
graphics hardware via OpenGL/Direct3D/Metal/Vulkan.*
|
|
||||||
|
|
||||||
Paf, premier essai, [premier souci](strangebug.md) **:)**
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* Strange Bug ?
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <SDL2/SDL.h>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
SDL_Window *win;
|
|
||||||
SDL_Renderer *rend;
|
|
||||||
int idx, idy;
|
|
||||||
|
|
||||||
if(SDL_CreateWindowAndRenderer(256, 256, SDL_WINDOW_SHOWN, &win, &rend))
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Err SDL_CreateWindowAndRenderer : %s", SDL_GetError());
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
SDL_SetRenderDrawColor(rend, 255, 0, 0, 0);
|
|
||||||
SDL_RenderClear(rend);
|
|
||||||
SDL_RenderPresent(rend);
|
|
||||||
|
|
||||||
for (idx=0; idx<256; idx++) {
|
|
||||||
for (idy=0; idy<256; idy++) {
|
|
||||||
SDL_SetRenderDrawColor(rend, 127, idx, idy, 0);
|
|
||||||
SDL_RenderDrawPoint(rend, idx, idy);
|
|
||||||
}
|
|
||||||
SDL_RenderPresent(rend);
|
|
||||||
// SDL_Delay(50); /* Is the bug here ? */
|
|
||||||
}
|
|
||||||
SDL_RenderPresent(rend);
|
|
||||||
sleep(30);
|
|
||||||
|
|
||||||
SDL_DestroyRenderer(rend);
|
|
||||||
SDL_DestroyWindow(win);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
# `strangebug`, ou le bug étrange
|
|
||||||
|
|
||||||
Pour mes premiers pas dans la sdl, j'ai voulu faire un gradient de couleur
|
|
||||||
dans une petite fenêtre, quelque chose de vraiment simple, me diriez-vous,
|
|
||||||
mais qui cache une chose étrange...
|
|
||||||
|
|
||||||
Voici le [Code source](strangebug.c). Si vous décommentez la ligne
|
|
||||||
marquée, seul une colonne sur deux est correctement tracée...
|
|
||||||
|
|
||||||
*Please explain*.
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user